package com.mind.adjust.service.impl;

import com.mind.system.domain.AjBasicTaxNumberMapping;
import com.mind.adjust.mapper.AjBasicTaxNumberMappingMapper;
import com.mind.adjust.service.AjBasicTaxNumberMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * (AjBasicTaxNumberMapping)表服务实现类
 *
 * @author makejava
 * @since 2024-12-02 13:40:54
 */
@Service("basicTaxNumberMappingService")
public class AjBasicTaxNumberMappingServiceImpl implements AjBasicTaxNumberMappingService {
    @Autowired
    private AjBasicTaxNumberMappingMapper basicTaxNumberMappingMapper;

    /**
     * 查询信息集合
     * 
     * @param basicTaxNumberMapping 信息
     * @return 信息集合
     */
    @Override
    public List<AjBasicTaxNumberMapping> selectBasicTaxNumberMappingList(AjBasicTaxNumberMapping basicTaxNumberMapping)
    {
        return basicTaxNumberMappingMapper.selectBasicTaxNumberMappingList(basicTaxNumberMapping);
    }

    /**
     * 通过ID查询信息
     * 
     * @param basicTaxNumberMappingId ID
     * @return 角色对象信息
     */
    @Override
    public AjBasicTaxNumberMapping selectBasicTaxNumberMappingById(Long basicTaxNumberMappingId)
    {
        return basicTaxNumberMappingMapper.selectBasicTaxNumberMappingById(basicTaxNumberMappingId);
    }

    /**
     * 删除信息
     * 
     * @param basicTaxNumberMappingId ID
     * @return 结果
     */
    @Override
    public int deleteBasicTaxNumberMappingById(Long basicTaxNumberMappingId)
    {
        return basicTaxNumberMappingMapper.deleteBasicTaxNumberMappingById(basicTaxNumberMappingId);
    }

    /**
     * 批量删除信息
     * 
     * @param basicTaxNumberMappingIds 需要删除的ID
     * @return 结果
     */
    @Override
    public int deleteBasicTaxNumberMappingByIds(String[] basicTaxNumberMappingIds)
    {
        return basicTaxNumberMappingMapper.deleteBasicTaxNumberMappingByIds(basicTaxNumberMappingIds);
    }

    /**
     * 新增保存信息
     * 
     * @param basicTaxNumberMapping 信息
     * @return 结果
     */
    @Override
    public int insertBasicTaxNumberMapping(AjBasicTaxNumberMapping basicTaxNumberMapping)
    {
        return basicTaxNumberMappingMapper.insertBasicTaxNumberMapping(basicTaxNumberMapping);
    }

    /**
     * 修改保存信息
     * 
     * @param basicTaxNumberMapping 信息
     * @return 结果
     */
    @Override
    public int updateBasicTaxNumberMapping(AjBasicTaxNumberMapping basicTaxNumberMapping)
    {
        return basicTaxNumberMappingMapper.updateBasicTaxNumberMapping(basicTaxNumberMapping);
    }
    
    /**
     * 批量插入
     *
     * @param basicTaxNumberMappingList 附件类型信息
     * @return 结果
     */
    @Override
    public int batchInsert(List<AjBasicTaxNumberMapping> basicTaxNumberMappingList) {
        int size = 0;
        for(AjBasicTaxNumberMapping basicTaxNumberMapping: basicTaxNumberMappingList) {
//            if (basicTaxNumberMappingMapper.selectBasicTaxNumberMappingByName(basicTaxNumberMapping.getName()) == null){
//                basicTaxNumberMappingMapper.insertBasicTaxNumberMapping(basicTaxNumberMapping);
//                size ++;
//            }
        }
        return size;
    }
}
